package com.htc.android.footprints.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.htc.android.footprints.utils.FootprintUtils;
import com.htc.android.footprints.utils.StorageUtil;
import com.htc.android.footprints.view.Snapshot;
import com.htc.android.footprints.vo.Footprint;

public class SnapshotActivity extends Activity
{
  public static final int MENU_TAKE_SNAPSHOT = 0;
  private static final String TAG = "SnapshotActivity";
  private Footprint mFootprint = null;
  private Snapshot mSnapshot = null;
  private StorageUtil mStorageUtil;

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    setContentView(2130903071);
    this.mSnapshot = ((Snapshot)findViewById(2131493012));
    this.mFootprint = ((Footprint)getIntent().getParcelableExtra("DATA"));
    if (this.mFootprint != null)
      this.mSnapshot.initPostcard(this.mFootprint);
    this.mSnapshot.invalidate();
    this.mStorageUtil = new StorageUtil(getApplicationContext());
    this.mStorageUtil.SetOnChangeStorageListerner(new StorageUtil.OnChangeStorageListener()
    {
      public void onStorageChanged(int paramInt)
      {
        if (paramInt > 1)
          SnapshotActivity.this.startActivity(FootprintUtils.getResetIntent());
      }
    });
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    paramMenu.add(0, 0, 0, getResources().getString(2131361918));
    return true;
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    if (paramMenuItem.getItemId() == 0)
      this.mSnapshot.takeSnapshot();
    return true;
  }

  protected void onPause()
  {
    super.onPause();
    if (this.mStorageUtil != null)
      this.mStorageUtil.closeStorgaeUtil();
  }
}

/* Location:           E:\workspace\dex2java\dex-translator-0.0.9.3\HtcFootprints_dex2jar.jar
 * Qualified Name:     com.htc.android.footprints.activity.SnapshotActivity
 * JD-Core Version:    0.6.0
 */